package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OFreeClassMapper;
import com.education.online.pojo.OFreeClass;
import com.education.online.service.OFreeClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 免费公开课表 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:49
 */
@Service
public class OFreeClassServiceImpl implements OFreeClassService {

    @Autowired
    private OFreeClassMapper oFreeClassMapper;

    @Override
    public List<OFreeClass> selectOFreeClassByMenuIds(List<Integer> menuIds) {
        return oFreeClassMapper.selectOFreeClassByMenuIds(menuIds);
    }

    @Override
    public List<OFreeClass> selectOFreeClassByName(String name) {
        return oFreeClassMapper.selectOFreeClassByName(name);
    }

    //查询免费公开课表信息
    @Override
    public OFreeClass selectOFreeClassById(Integer id) {
        return oFreeClassMapper.selectOFreeClassById(id);
    }

    // 查询免费公开课表列表
    @Override
    public List<OFreeClass> selectOFreeClassList(OFreeClass oFreeClass) {
        return oFreeClassMapper.selectOFreeClassList(oFreeClass);
    }

    // 新增免费公开课表
    @Override
    public int insertOFreeClass(OFreeClass oFreeClass) {
        return oFreeClassMapper.insertOFreeClass(oFreeClass);
    }

    //修改免费公开课表
    @Override
    public int updateOFreeClass(OFreeClass oFreeClass) {
        return oFreeClassMapper.updateOFreeClass(oFreeClass);
    }

    //删除免费公开课表对象
    @Override
    public int deleteOFreeClassByIds(String ids) {
        return oFreeClassMapper.deleteOFreeClassByIds(Convert.toStrArray(ids));
    }
}